<template>
  <header>
    <div class="back" @click="back">
      <i class="iconfont icon-back"></i>
    </div>
    <h1>{{tit}}</h1>
  </header>
</template>

<script type="text/ecmascript-6">
  import router from '../../router/index';

  export default {
    props: {
      tit: String
    },
    methods: {
      back: function () {
        router.push('/');
      }
    }
  };
</script>

<style lang="scss" scoped>
  header{
    height: 44px;
    width: 100%;
    background-color: #41B883;
    position: relative;

    .back{
      position: absolute;
      width: 44px;
      line-height:44px;
      text-align: center;
      color: #fff;
    }
    h1{
      text-align: center;
      line-height:44px;
      font-size: 18px;
      color: #fff;
    }
  }
</style>
